<?php 
namespace plugins\finance\model;

use think\Model;
use think\Db;

class FinanceBindModel extends Model{

	//账户绑定
	public function appBind($pay_type,$bind){
		$this->bind_aim = $pay_type;
		// if($pay_type == 'wechatpay'){
			$this->openid = $bind['openId'];
			$this->bind_name = $bind['nickName'];
		// }

		$result = $this->save();

		if($result){
			return ['status'=>true,'message'=>'添加成功'];
		}
		return ['status'=>false,'message'=>'添加失败'];
	}

}